home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / Text / Edit / XDme / Docs / dmeARexxMac.addendum < prev    next >
Text File  |  1992-05-28  |  4KB  |  104 lines

  1.  
  2.  
  3. This docment covers features added by Thomas J. Moore and MMW (whoever that
  4. is.. in 1992)
  5.  
  6.  
  7. First, the rexx port handler has been moved to the main loop, which checks
  8. now for intuition messages AND AREXX messages.    The AREXX messages are blocked
  9. when dme is in command line mode.  Thus, a rexx script can now expect input
  10. from the user via "esc" or, more usefully, "escimm <prompt>".  Care should
  11. be taken with this new AREXX feature, though.  If dme is closed while macros are
  12. running, the macros will (hopefully cleanly) die.  The only way to make sure
  13. that the configuration of dme is the same from one dme command to another
  14. is to put several dme commands on the same line.  Thus the ARexx script:
  15.  
  16. "newwindow"
  17. "newfile (hello)"
  18.  
  19. will not guarantee that "hello" will be put up in the newwindow created in the
  20. previous line, whereas :
  21. "newwindow newfile (hello)"
  22. can make that guarantee.
  23.  
  24. There may be other problems, but I'm not going to go into them.  Just be
  25. careful!
  26.  
  27.  
  28. Things to implement in the future:
  29. lock        -- locks the current window for this rexx script until script returns
  30.         -- returns a lock #
  31. unlock #    -- explicitly unlock the lock before script returns
  32. golock #    -- make sure the window specified in lock is current
  33.  
  34. Maybe later, if I feel like it...
  35. --NOTE--
  36. The following commands have been added as a temporary fix to the lock problem:
  37.  
  38. rxblock     - block all intuition messages
  39. rxunblock   - unblock all intuition messages - if dme appears to lock up, try :
  40.         rx "address dme rxunblock"
  41. --END NOTE--
  42.  
  43. The other addition is the command "getval" which sets the secondary result to
  44. the parsed/variable-substituted remainder of the command line.    Thus:
  45. options results
  46. "getval ($filename)"
  47. say result
  48.  
  49. will print the current file name.
  50.  
  51. Enclosed are several macros.  Most of the ones in s/ were from some Fish disk
  52. (I don't remember which), with the .edrc modified for my preferences.  These
  53. should all go into s: to work (the the dmemacros dir macros need modification
  54. to work.. If you want 'em, modify 'em yourself.)
  55.  
  56. Some of the rexx macros were included with the dme distribution.  See
  57. dmeARexxMac.doc.  The rest are documented here:
  58.  
  59. dmake.dme [<addr>]  - "dmake" the current file. (Mostly written by Paul Cardwell)
  60.             - Read the prompts in the title bar.  It will use dmake if
  61.             - "makefile" or "dmakefile" are found in $fpath, and it
  62.             - will try to dcc -o name name.c if not.  May have to
  63.             - be modified slightly; read the macro yourself before
  64.             - using.
  65.             - Note: the error messages are put in a buffer called
  66.             - "*Compiler Errors*" whether you like it or not.  Also,
  67.             - dmake does not return all error messages consistently, so
  68.             - dcc's "-E" option is used, and only those messages will be
  69.             - intercepted.  If you want other messages, either run dme
  70.             - from the CLI (w/o >nil:) or using WB 2.0's Execute CMD
  71.             - feature.    This will at least display what dmake is
  72.             - doing.  It will not, however, intercept the messages.
  73.             - bound to as-m in my .edrc
  74.  
  75. FirstErr.dme        - Locate the first error in the error message buffer created
  76.             - dmake.dme.  Highlights line w/ error (w/ pushmark + block).
  77.             - uses ping/pong #9  SO DON'T USE IT ELSEWHERE!
  78.             - bound to a-f in my .edrc
  79. NextErr.dme        - Locate the next error in the error message buffer created by
  80.             - dmake.dme
  81.             - bound to a-n in my .edrc
  82.  
  83. Here's another useful macro (addresses one of Matt's TODO's)
  84. /* autosave */
  85. options results
  86. do while true
  87.     call delay(600)
  88.     "getval ($filename)"
  89.     if upper(result) ~= "UNNAMED" then
  90.     "saveold"
  91.     else
  92.     "escimm (saveas `"
  93. end
  94.  
  95.  
  96. Note:
  97.     Asynchronous operation of ARexx macros does NOT mean Async operation of
  98. dme commands.  This means that a line of dme code will execute until done.
  99. Also, a rexx command called from a rexx script will block the caller until
  100. the callee completes.  This blocking will not, however, block dme or any other
  101. running macro.
  102.  
  103. Anyway, have fun!
  104.